package com.dems.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dems.dao.dataobject.ProductInfo;
import com.dems.dao.mapper.la.ProductInfoMapper;
import com.dems.domain.ProductReqVO;
import com.dems.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductInfoMapper productInfoMapper;

    @Override
    public Page queryProductByPage(ProductReqVO reqVO) {
        Page<ProductInfo> page = new Page<>(reqVO.getPageNum(), reqVO.getPageSize());
        return productInfoMapper.selectByPage(page, new ProductInfo());
    }
}
